	<article class="module width_full">
		<div class="title"><span class="title_icon"><img src='<?php echo $this->basePath();?>/images/bullet1.png' /></span>Danh sách học sinh</div>
		<br><br>
		<div class="table_layout">
	<?php
		if ($this->paginator != null) {
			if (!isset($_GET['page']))
				$count	= 0;
			else
				$count	= ($_GET['page'] - 1)*$this->perpage;
	?>
		<br>
		<table class="table table-striped">
			<tr>
				<td style="width: 10%"><strong>STT</strong></td>
				<td style="width: 25%"><strong>Tên đăng nhập</strong></td>
				<td style="width: 25%"><strong>Họ tên</strong></td>
				<td style="width: 20"><strong>Ngày sinh</strong></td>
				<td style="width: 20%"><strong>Điểm trung bình</strong></td>
			</tr>
		<?php foreach ($this->paginator as $item) : $count++;?>
			<tr>
				<td><?php echo $count?></td>
				<td><?php echo $item->username;?></td>
				<td><?php echo $item->name;?></td>
				<td>
					<?php
						$parts = explode('-', $item->birthday);
						$newFormat  = $parts[2]."-".$parts[1]."-".$parts[0];
						echo $newFormat;
					?>
				</td>
				<td align="center"><?php echo $item->average_mark;?></td>
			</tr>
		<?php endforeach; ?>
		</table>
		<?php }?>
		</div>
	</article>
<?php
	$url	= "viewstudent";
	echo $this->paginationControl(
		$this->paginator,
		'sliding',
		array('partial/paginator.phtml', 'Student'),
		array(
			'route'	=> 'index',
			'url'	=> $url,
		)
	);